package org.scs.carleton.ca.pgdt.core.parser.nodes;

import org.scs.carleton.ca.pgdt.core.visitor.Visitable;

/**
 * All nodes must implement this interface; it is used to proivde generic information about a Prolog node/element.
 * 
 * @author tessierj
 *
 */
public interface IASTNode extends Visitable {
	/**
	 * Returns the translation unit that generated this node
	 * 
	 * @return
	 */
	public IASTTranslationUnit getTranslationUnit();
	
	/**
	 * Returns the node's parent
	 * 
	 * @return
	 */
	public IASTNode getOwner();
	
	/**
	 * Returns the node type.  This is linked to the IASTNodeTypes class
	 * 
	 * @return
	 */
	public int getType();
	
	/**
	 * Returns the starting offset of a node
	 * 
	 * @return
	 */
	public int getStartOffset();
	
	/**
	 * Returns the ending offset of a node
	 * 
	 * @return
	 */
	public int getEndOffset();
	
	/**
	 * Returns the length of the node
	 * 
	 * @return
	 */
	public int getLength();
}
